home *** CD-ROM | disk | FTP | other *** search
- property startpt, endpt, movieSprite, looptype
-
- on birth me, myStart, myEnd, myLoop
- set movieSprite to 10
- set startpt to myStart
- set endpt to myEnd
- set looptype to myLoop
- return me
- end
-
- on playPatch me
- global currentRate
- set the movieTime of sprite movieSprite to startpt
- if looptype = 0 then
- set the movieRate of sprite movieSprite to 0
- else
- set the movieRate of sprite movieSprite to 1
- end if
- updateStage()
- set currentRate to the movieRate of sprite movieSprite
- end
-
- on checkLoop me
- global currentRate
- if looptype = 1 then
- if the movieTime of sprite movieSprite >= endpt then
- set the movieTime of sprite movieSprite to startpt
- set the movieRate of sprite movieSprite to abs(currentRate)
- end if
- else
- if looptype = -1 then
- if the movieTime of sprite movieSprite >= endpt then
- set the movieRate of sprite movieSprite to -1 * abs(currentRate)
- else
- if the movieTime of sprite movieSprite <= startpt then
- set the movieRate of sprite movieSprite to abs(currentRate)
- end if
- end if
- end if
- end if
- end
-